home *** CD-ROM | disk | FTP | other *** search
- if(_parent.FirstCard == _parent.SecondCard)
- {
- if(_parent.CurrentPairsCount == 11)
- {
- _parent.FinalTime = "YOUR TIME: " + _parent.Timer.time;
- _parent.FinalFlips = "FLIP COUNT: " + _parent.CurrentFlipsCount;
- _parent.FinalTimeNum = int(_parent.Timer.atime[2]) * 60 + int(_parent.Timer.atime[4]) + int(_parent.Timer.atime[6]) / 10;
- _parent.FinalFlipsNum = _parent.CurrentFlipsCount;
- if(_parent.UsePersonalBest)
- {
- _parent.UpdateCookies = false;
- if(_parent.FinalTimeNum < _parent.CookieGameTime | _parent.CookieGameTime == 0)
- {
- _parent.PersonalBestTime = _parent.FinalTimeNum;
- _parent.UpdateCookies = true;
- }
- else
- {
- _parent.PersonalBestTime = _parent.CookieGameTime;
- }
- if(_parent.FinalFlipsNum < _parent.CookieGameFlips | _parent.CookieGameFlips == 0)
- {
- _parent.PersonalBestFlips = _parent.FinalFlipsNum;
- _parent.UpdateCookies = true;
- }
- else
- {
- _parent.PersonalBestFlips = _parent.CookieGameFlips;
- }
- if(_parent.UpdateCookies)
- {
- _parent.PersonalRecords.gotoAndPlay("SetCookies");
- }
- }
- if(_parent.UseScoreboard)
- {
- _parent.GameOverPage = "GameComplete";
- _parent.gotoAndPlay("GameOver");
- }
- else
- {
- _parent.GameOverPage = "CompleteNoScoreboard";
- _parent.gotoAndPlay("GameOver");
- }
- }
- else
- {
- tellTarget("_parent." + _parent.FirstCardName + ".CardMotion")
- {
- gotoAndStop("CardFadeOut");
- play();
- }
- tellTarget("_parent." + _parent.SecondCardName + ".CardMotion")
- {
- gotoAndStop("CardFadeOut");
- play();
- }
- _parent.matchedArray[_parent.FirstCard] = true;
- var TempPairsCount = 0;
- x = 1;
- while(x < 13)
- {
- if(_parent.matchedArray[x])
- {
- TempPairsCount++;
- }
- x++;
- }
- _parent.CurrentPairsCount = TempPairsCount;
- _parent.CurrentPairs = "PAIRS MATCHED: " + _parent.CurrentPairsCount;
- }
- }
- else
- {
- tellTarget("_parent." + _parent.FirstCardName + ".CardMotion")
- {
- gotoAndStop("SpinBack");
- play();
- }
- tellTarget("_parent." + _parent.SecondCardName + ".CardMotion")
- {
- gotoAndStop("SpinBack");
- play();
- }
- }
-